package com.bawei.mall.search.controller;

import com.bawei.common.core.domain.R;
import com.bawei.mall.search.domain.Po.User;
import com.bawei.mall.search.service.UserService;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：liurui
 * @Package：com.bawei.mall.search.controller
 * @Project：mall_cloud
 * @name：UserProductController
 */
@RestController
@Log4j2
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService service;

    /**
     * 查询登录用户信息
     * @return
     */
    @GetMapping("/findUser")
    public R<User> findUser(){
        User user=service.findUser();
        return R.ok(user);
    }


}
